package com.igeek.bean;

import java.math.BigDecimal;
import java.util.List;
import java.util.ArrayList;

public class User {

    private String username;

    private String password;

    private int power;

    public void setComparelist(Car comparelist) {
        this.comparelist.add(comparelist);
    }

    public ArrayList<Car> getComparelist() {
        return comparelist;
    }

    private double balance;

    private ArrayList<Car> comparelist = new ArrayList<>();

    public ArrayList<Car> getCars() {
        return cars;
    }

    private ArrayList<Car> cars = new ArrayList<>();

    public void setCars(Car car) {
        this.cars.add(car) ;
    }

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", power=" + power +
                ", balance=" + balance +
                ", cars=" + cars +
                '}';
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public User(String username, String password, double balance) {
        this.username = username;
        this.password = password;
        this.balance = balance;
    }
}
